package com.easy.mapper;

import com.easy.bean.Department;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DepartmentMapper {
    // 新增科室
    int add(Department department);

    // 删除科室（软删除）
    int del(@Param("id") Integer id);

    // 编辑科室
    int edit(Department department);

    // 查询所有科室
    List<Department> all(Department department);

    // 根据ID查询科室
    Department one(@Param("id") Integer id);

    // 分页查询总条数
    int count(Department department);

    // 分页查询数据（参数：科室条件、分页信息）
    List<Department> page(@Param("department") Department department,
                          @Param("page") Page page);
}